<template>
	<view :data-theme="theme">

		<view class="card" style="margin-top: 40rpx;padding: 10px 10px 10px; 10px">
			<view class="product-title">规格信息</view>
			<u--form labelPosition="left" :model="form1" :rules="rules" ref="uForm">
				<view style="display: flex;flex-flow: row wrap;margin-bottom: 100rpx;">
					<u-form-item label="规格图片" prop="productAttr.image" required labelWidth="80" ref="item1">
						<u-upload style="flex: none;" :fileList="imageList1" @afterRead="afterRead" @delete="deletePic"
							name="1" :maxCount="1" uploadText="规格封面图"></u-upload>
					</u-form-item>
					<!-- <u-form-item label="规格名称" prop="productAttr.sku" required labelWidth="80" ref="item1">
						<input :disabled="form1.productAttr.sku.split(',').length > 1 ? true : false"
							v-model.trim="form1.productAttr.sku" placeholder="请输入" border="surround"
							style="padding-left: 20rpx; background-color: #fff;border-radius: 10rpx;border: 1px solid #c2c2c1;height: 60rpx;"></input>
					</u-form-item> -->
					<u-form-item label="规格" prop="productAttr.specUnit.minSpecNumber" required labelWidth="80"
						ref="item1" style="margin-bottom: 30rpx;">
						<view class="input-container">
							<view class="fixed-text" style="display: flex;flex-flow: row;"
								:style="{color:showGroupUnit?bgColor:null}" @click="openGroupUnits(1)">
								<!-- @click="editDisabled ? null : openGroupUnits(1)" -->
								<view v-if="!form1.productAttr.specUnit.sellUnit"
									style="font-size: 14px;margin-right: 6rpx;">每单位
								</view>
								<view v-else-if="form1.productAttr.specUnit.sellUnit"
									style="font-size: 14px;margin-right: 6rpx;">每{{form1.productAttr.specUnit.sellUnit}}
								</view>
								<u-icon :name="showGroupUnit?'arrow-up-fill':'arrow-down-fill'" size="12"
									:color="showGroupUnit?bgColor:''"></u-icon>
								<span style="margin: 0 10rpx;display: inline-block;">|</span>
							</view>
							<view
								style="display: inline-block;padding-left:145rpx;padding-right: 130rpx; background-color: #fff;border-radius: 10rpx;border: 1px solid #c2c2c1;height: 60rpx;">
								<u--input v-model.trim="form1.productAttr.specUnit.minSpecNumber" placeholder="请输入"
									border="none" type="number" style="height: 60rpx;border: none;"></u--input>
							</view>
							<view class="fixed-right" style="display: flex;flex-flow: row;"
								:style="{color:showGroupUnit2?bgColor:null}" @click="openGroupUnits(2)">
								<!-- @click="editDisabled ? openGroupUnits(2) : null" -->
								<span style="margin: 0 10rpx;display: inline-block;">|</span>
								<view v-if="!form1.productAttr.specUnit.innerPackagingUnit"
									style="font-size: 14px;margin-right: 6rpx;">单位
								</view>
								<view v-else-if="form1.productAttr.specUnit.innerPackagingUnit"
									style="font-size: 14px;margin-right: 6rpx;">
									{{form1.productAttr.specUnit.innerPackagingUnit}}
								</view>
								<u-icon :name="showGroupUnit2?'arrow-up-fill':'arrow-down-fill'" size="12"
									:color="showGroupUnit2?bgColor:''"></u-icon>
							</view>
						</view>
					</u-form-item>
					<view class="input-container" style="margin-left: 160rpx;">
						<view class="fixed-text" style="display: flex;flex-flow: row;">
							<view v-if="!form1.productAttr.specUnit.innerPackagingUnit"
								style="font-size: 14px;margin-right: 6rpx;">其中每单位
							</view>
							<view v-else-if="form1.productAttr.specUnit.innerPackagingUnit"
								style="font-size: 14px;margin-right: 6rpx;">
								其中每{{form1.productAttr.specUnit.innerPackagingUnit}}
							</view>
							<span style="margin: 0 10rpx;display: inline-block;">|</span>
						</view>
						<view
							style="display: inline-block;padding-left:180rpx;padding-right: 110rpx; background-color: #fff;border-radius: 10rpx;border: 1px solid #c2c2c1;height: 60rpx;">
							<u--input v-model.trim="form1.productAttr.specUnit.innerPackagingNumber" placeholder="请输入"
								border="none" type="number" style="border: none;height: 60rpx;"></u--input>
						</view>
						<view class="fixed-right" style="display: flex;flex-flow: row;"
							:style="{color:showGroupUnit3?bgColor:null}" @click="openGroupUnits(3)">
							<!-- @click="editDisabled ? openGroupUnits(3) : null" -->
							<span style="margin: 0 10rpx;display: inline-block;">|</span>
							<view v-if="!form1.productAttr.specUnit.minSpecUnit"
								style="font-size: 14px;margin-right: 6rpx;">单位
							</view>
							<view v-else-if="form1.productAttr.specUnit.minSpecUnit"
								style="font-size: 14px;margin-right: 6rpx;">
								{{form1.productAttr.specUnit.minSpecUnit}}
							</view>
							<u-icon :name="showGroupUnit3?'arrow-up-fill':'arrow-down-fill'" size="12"
								:color="showGroupUnit3?bgColor:''"></u-icon>
						</view>
					</view>
					<view v-if="inputValid1 && inputValid2 && inputValid3 && inputValid4 && inputValid5">
						<u-form-item label="商品净重" labelWidth="80" ref="item1" style="margin-bottom: 30rpx;">
							<view class="input-container">
								<view class="fixed-text" style="display: flex;flex-flow: row;">
									<view v-if="!form1.productAttr.specUnit.sellUnit"
										style="font-size: 14px;margin-right: 6rpx;">每单位
									</view>
									<view v-else-if="form1.productAttr.specUnit.sellUnit"
										style="font-size: 14px;margin-right: 6rpx;">
										每{{form1.productAttr.specUnit.sellUnit}}
									</view>
									<span style="margin: 0 10rpx;display: inline-block;">|</span>
								</view>
								<view
									style="display: inline-block;padding-left:120rpx;padding-right: 110rpx; background-color: #f7f7f7;border-radius: 10rpx;border: 1px solid #c2c2c1;height: 60rpx;">
									<!-- <u--input v-model.trim="form1.productAttr.netWeight" placeholder="请输入"
										type="number" border="surround" style="border: none;height: 60rpx;"></u--input> -->
									<u--input v-if="true" :disabled="true" v-model.trim="processedNetWeight"
										placeholder="请输入" type="number" disabledColor="#f7f7f7"
										style="border: none;height: 50rpx;"></u--input>
								</view>
								<view class="fixed-right" style="display: flex;flex-flow: row;"
									:style="{color:showGroupUnit4?bgColor:null}"
									@click="true ? null : openGroupUnits(4)">
									<span style="margin: 0 10rpx;display: inline-block;">|</span>
									<view v-if="!form1.productAttr.specUnit.netWeightUnit"
										style="font-size: 14px;margin-right: 6rpx;">单位
									</view>
									<view
										v-else-if="form1.productAttr.specUnit.minSpecUnit || form1.productAttr.specUnit.netWeightUnit"
										style="font-size: 14px;margin-right: 6rpx;">
										{{true ? form1.productAttr.specUnit.minSpecUnit : form1.productAttr.specUnit.netWeightUnit}}
									</view>
									<u-icon :name="showGroupUnit4?'arrow-up-fill':'arrow-down-fill'" size="12"
										:color="showGroupUnit4?bgColor:''"></u-icon>
								</view>
							</view>
						</u-form-item>
						<u-form-item label="商品毛重" prop="productAttr.specUnit.roughWeight" required labelWidth="80"
							ref="item1" style="margin-bottom: 30rpx;">
							<view class="input-container">
								<view class="fixed-text" style="display: flex;flex-flow: row;">
									<view v-if="!form1.productAttr.specUnit.sellUnit"
										style="font-size: 14px;margin-right: 6rpx;">
										每单位
									</view>
									<view v-else-if="form1.productAttr.specUnit.sellUnit"
										style="font-size: 14px;margin-right: 6rpx;">
										每{{form1.productAttr.specUnit.sellUnit}}
									</view>
									<span style="margin: 0 10rpx;display: inline-block;">|</span>
								</view>
								<view
									style="display: inline-block;padding-left:120rpx;padding-right: 110rpx; background-color: #fff;border-radius: 10rpx;border: 1px solid #c2c2c1;height: 60rpx;">
									<u--input v-model.trim="form1.productAttr.specUnit.roughWeight" placeholder="请输入"
										type="number" border="none" style="border: none;height: 60rpx;"></u--input>
								</view>
								<view class="fixed-right" style="display: flex;flex-flow: row;"
									:style="{color:showGroupUnit5?bgColor:null}"
									@click="editDisabled ? null : openGroupUnits(5)">
									<span style="margin: 0 10rpx;display: inline-block;">|</span>
									<view v-if="!form1.productAttr.specUnit.roughWeightUnit"
										style="font-size: 14px;margin-right: 6rpx;">单位
									</view>
									<view v-else-if="form1.productAttr.specUnit.roughWeightUnit"
										style="font-size: 14px;margin-right: 6rpx;">
										{{form1.productAttr.specUnit.roughWeightUnit}}
									</view>
									<u-icon :name="showGroupUnit5?'arrow-up-fill':'arrow-down-fill'" size="12"
										:color="showGroupUnit5?bgColor:''"></u-icon>
								</view>
							</view>
						</u-form-item>
						<!-- <u-form-item label="国际条码" prop="productAttr.barCode" labelWidth="80" ref="item1"
							style="margin-bottom: 30rpx;">
							<view class="input-container">
								<input v-model="form1.productAttr.internationalBarcode" placeholder="请输入" border="surround"
									style="padding-left:20rpx;background-color: #fff;border-radius: 10rpx;border: 1px solid #c2c2c1;height: 60rpx;"></input>
							</view>
						</u-form-item> -->
						<u-form-item label="箱规" prop="productAttr.specUnit.cartonNumber" required labelWidth="80"
							ref="item1" style="margin-bottom: 30rpx;">
							<view class="input-container" style="width: 90%;">
								<view class="fixed-text" style="display: flex;flex-flow: row;"
									:style="{color:showGroupUnit6?bgColor:null}"
									@click="editDisabled ? null :openGroupUnits(6)">
									<view v-if="!form1.productAttr.specUnit.cartonUnit"
										style="font-size: 14px;margin-right: 6rpx;">
										每单位
									</view>
									<view v-else-if="form1.productAttr.specUnit.cartonUnit"
										style="font-size: 14px;margin-right: 6rpx;">
										每{{form1.productAttr.specUnit.cartonUnit}}
									</view>
									<u-icon :name="showGroupUnit6?'arrow-up-fill':'arrow-down-fill'" size="12"
										:color="showGroupUnit6?bgColor:''"></u-icon>
									<span style="margin: 0 10rpx;display: inline-block;">|</span>
								</view>
								<view
									style="display: inline-block;padding-left:146rpx;padding-right: 200rpx; background-color: #fff;border-radius: 10rpx;border: 1px solid #c2c2c1;height: 60rpx;">
									<u--input v-model.trim="form1.productAttr.specUnit.cartonNumber" placeholder="请输入"
										type="number" border="none" style="border: none;height: 60rpx;"></u--input>
								</view>
								<view class="fixed-right" style="display: flex;flex-flow: row;">
									<span style="margin: 0 10rpx;display: inline-block;">|</span>
									<view v-if="!form1.productAttr.specUnit.sellUnit"
										style="font-size: 14px;margin-right: 6rpx;">
										个规格（单位）</view>
									<view v-else-if="form1.productAttr.specUnit.sellUnit"
										style="font-size: 14px;margin-right: 6rpx;">
										个规格（{{form1.productAttr.specUnit.sellUnit}}）</view>
								</view>
							</view>
						</u-form-item>
					</view>
					<u-form-item label="国际条码" prop="productAttr.specUnit.IntBarCode" required labelWidth="80"
						ref="item1">
						<view class="sku-select1" style="-webkit-flex-wrap: wrap;flex-wrap: wrap;">
							<view class="radio"
								:class='item.name == form1.productAttr.specUnit.IntBarCode? "active" : ""'
								v-for="(item,index) in IntBarCodeList" :key="index"
								@click="editDisabled ? null : barCodeChange(item)">
								{{item.name}}
							</view>
						</view>
					</u-form-item>
					<view v-if="form1.productAttr.specUnit.IntBarCode == '有'" class="input-container"
						style="margin-left: 160rpx;width: 50%;background-color: #f5f5f5;">
						<input v-model.trim="form1.productAttr.specUnit.internationalBarcode" placeholder="填国际条码"
							type="number" border="none"
							style="padding-left:10rpx;padding-right: 120rpx; background-color: #fff;border-radius: 10rpx;border: 1px solid #c2c2c1;height: 60rpx;"></input>
						<view class="fixed-right" style="display: flex;flex-flow: row;align-items: center;"
							:style="{color:showGroupUnit7?bgColor:null}"
							@click="editDisabled ? null : openGroupUnits(7)">
							<span style="margin: 0 10rpx;display: inline-block;">|</span>
							<uni-icons type="scan" size="20" color="#ccc" @click="scanEvent"></uni-icons>
						</view>
					</view>

					<u-form-item label="生产日期" prop="productAttr.specUnit.manufactureDate" required labelWidth="80"
						ref="item1">
						<view class="choose-container" style="display: flex;">
							<uni-datetime-picker type="datetime"
								v-model="form1.productAttr.specUnit.manufactureDate"><input
									v-model="form1.productAttr.specUnit.manufactureDate" disabled placeholder="请选择"
									border="surround"
									style="padding-left:10rpx;padding-right: 120rpx;height: 60rpx; pointer-events: none;"></input>
								<u-icon v-if="productAttrParam.type == 'add'" name="arrow-right" color="#808080"
									size="16" class="fixed-right"
									style="display: flex;flex-flow: row;"></u-icon></uni-datetime-picker>
						</view>
					</u-form-item>
					<!-- <view v-if="showMoreItem"> -->
					<view>

						<view v-if="this.isHasIdEdit">
							<u-form-item label="生产日期" prop="productAttr.specUnit.manufactureDate" required
								labelWidth="80" ref="item1">
								<view class="choose-container" style="display: flex;">
									<uni-datetime-picker type="datetime"
										v-model="form1.productAttr.specUnit.manufactureDate"><input
											v-model="form1.productAttr.specUnit.manufactureDate" disabled
											placeholder="请选择" border="surround"
											style="padding-left:10rpx;padding-right: 120rpx;height: 60rpx; pointer-events: none;"></input>
										<u-icon v-if="productAttrParam.type == 'add'" name="arrow-right" color="#808080"
											size="16" class="fixed-right"
											style="display: flex;flex-flow: row;"></u-icon></uni-datetime-picker>
								</view>
							</u-form-item>
							<u-form-item label="保质期" prop="productAttr.specUnit.isShelfLife" required labelWidth="80"
								ref="item1">
								<view class="sku-select1" style="-webkit-flex-wrap: wrap;flex-wrap: wrap;">
									<view class="radio"
										:class='item.type == form1.productAttr.specUnit.isShelfLife? "active" : ""'
										v-for="(item,index) in buttonData" :key="index"
										@click="productAttrParam.type == 'add'? attChange(item) : null">
										{{item.name}}
									</view>
								</view>
							</u-form-item>
							<view v-if="form1.productAttr.specUnit.isShelfLife == '1'" class="input-container"
								style="margin-left: 160rpx;width: 40%;">
								<input v-model.trim="form1.productAttr.specUnit.shelfLifeNumber"
									:disabled="productAttrParam.type != 'add'" placeholder="填时长" type="number"
									border="surround" disabledColor="#f7f7f7"
									style="padding-left:10rpx;padding-right: 120rpx;border-radius: 10rpx;border: 1px solid #c2c2c1;height: 60rpx;background-color: #f7f7f7;"
									:style="{'background-color': productAttrParam.type == 'add' ? '#fff' : '#f7f7f7' }"></input>
								<view class="fixed-right" style="display: flex;flex-flow: row;"
									:style="{color:showGroupUnit7?bgColor:null}"
									@click="productAttrParam.type == 'add' ? openGroupUnits(7) : null">
									<span style="margin: 0 10rpx;display: inline-block;">|</span>
									<view style="font-size: 14px;margin-right: 6rpx;">
										<span
											v-if="form1.productAttr.specUnit.shelfLifeUnit == '月'">个</span>{{form1.productAttr.specUnit.shelfLifeUnit}}
									</view>
									<u-icon :name="showGroupUnit7?'arrow-up-fill':'arrow-down-fill'" size="12"
										:color="showGroupUnit7?bgColor:''"></u-icon>
								</view>
							</view>

							<u-form-item label="运输方式" prop="productAttr.specUnit.modeOfTransport" required
								labelWidth="80" ref="item1">
								<view class="choose-container" style="display: flex;color: #999;"
									@click="productAttrParam.type != 'add' ? null : radioGroup()">
									<input v-model="form1.productAttr.specUnit.modeOfTransport" disabled
										placeholder="填选择" border="surround"
										style="padding-left:10rpx;padding-right: 120rpx;height: 60rpx;pointer-events: none;"></input>
									<u-icon v-if="productAttrParam.type == 'add'" name="arrow-right" color="#808080"
										size="16" class="fixed-right" style="display: flex;flex-flow: row;"></u-icon>
								</view>
							</u-form-item>
							<u-form-item label="贮存方式" prop="productAttr.specUnit.storageMode" required labelWidth="80"
								ref="item1">
								<view class="choose-container" style="display: flex;color: #999;"
									@click="productAttrParam.type != 'add' ? null : radioGroup2()">
									<input v-model="form1.productAttr.specUnit.storageMode" disabled placeholder="填选择"
										border="surround"
										style="padding-left:10rpx;padding-right: 120rpx;height: 60rpx;"></input>
									<u-icon v-if="productAttrParam.type == 'add'" name="arrow-right" color="#808080"
										size="16" class="fixed-right" style="display: flex;flex-flow: row;"></u-icon>
								</view>
							</u-form-item>

							<!-- <u-form-item label="商品编号" prop="productAttr.barCode" labelWidth="80" ref="item1">
									<view class="input-container">
										<input v-model="form1.productAttr.barCode" placeholder="请输入" border="surround"
											style="padding-left:10rpx;padding-right: 120rpx; background-color: #fff;border-radius: 10rpx;border: 1px solid #c2c2c1;height: 60rpx;"></input>
									</view>
								</u-form-item> -->
							<!-- <u-form-item label="重量(KG)" prop="productAttr.weight" labelWidth="80" ref="item1">
									<view class="input-container">
										<input v-model.trim="form1.productAttr.weight" placeholder="请输入" type="number"
											border="surround"
											style="padding-left:10rpx;padding-right: 120rpx; background-color: #fff;border-radius: 10rpx;border: 1px solid #c2c2c1;height: 60rpx;"></input>
									</view>
								</u-form-item>
								
								 -->
						</view>
						<u-form-item label="体积(m³)" prop="productAttr.volume" labelWidth="80" ref="item1">
							<view class="input-container">
								<input v-model.trim="form1.productAttr.volume" placeholder="请输入" type="number"
									border="surround"
									style="padding-left:10rpx;padding-right: 120rpx; background-color: #fff;border-radius: 10rpx;border: 1px solid #c2c2c1;height: 60rpx;"></input>
							</view>
						</u-form-item>
					</view>

					<!-- <view class="show-more-item">
							<span style="color: #767676;padding-right: 10rpx;"
								@click="isShowMoreItem">{{showMoreItem?'收起':'展开（非必填内容）'}}</span>
							<u-icon v-if="showMoreItem" name="arrow-up" color="#ccc" size="18"></u-icon>
							<u-icon v-if="!showMoreItem" name="arrow-down" color="#ccc" size="18"></u-icon>
						</view> -->
					<!-- </view> -->

				</view>
			</u--form>


		</view>
		<view class="card">
			<u-form>
				<u-form-item label="绑定物资" prop="productAttr.specUnit.IntBarCode" labelWidth="80" ref="item1">
					<view class="input-container" style="display: flex;" @click="editDisabled ? null : openDataPopup()">
						<input v-model="vesseValue" disabled placeholder="请选择" border="surround"
							style="padding-left:10rpx;padding-right: 120rpx;height: 60rpx; pointer-events: none;"></input>
						<u-icon v-if="!editDisabled" name="arrow-right" color="#808080" size="16" class="fixed-right"
							style="display: flex;flex-flow: row;"></u-icon>
					</view>
				</u-form-item>
			</u-form>
		</view>

		<view style="margin-bottom: 220rpx;"></view>

		<tui-drawer mode="bottom" :visible="showUpDatePopup" @close="closeComuleDate">
			<view class="u-demo-block2 ensure">
				<view class="title"><text @click="closeComuleDate" class="iconfont icon-guanbi5"></text>物资列表<text
						@click="materialConfirm" class="iconfontRight">确认</text></view>
				<view class="content-item" style="flex: 1;">
					<!-- 内容区域 -->
					<view class="tab-view">
						<scroll-view class="scroll-view print_center" scroll-y="true"
							:style="{ 'padding-bottom':'20rpx' }" style="overflow: hidden;">
							<view class="swiper-page checke_list">
								<checkbox-group v-model="checkboxValue" @change="checkboxGroup">
									<label class="uni-list-cell uni-list-cell-pd checke_item"
										v-for="(item, index) in dataList" :key="index">

										<view class="item_top">
											<checkbox :value="JSON.stringify(item)" :iconColor="bgColor"
												:checked="item.checked" class="round-checkbox" />
											<view class="item_img">
												<u--image :showLoading="true" :src="item.image" width="80px"
													height="80px"></u--image>
											</view>
											<view class="item_right">
												<text
													v-if="item.brandName != null">[{{item.brandName}}]</text>{{item.materialName}}
												({{item.specParam}})
												<view style="font-size: 30rpx;font-weight: normal;">
													单价:{{item.cost}}元
												</view>
											</view>
										</view>

										<!-- <view class="item_bottom"
											style="font-size: 30rpx;color: #808080;margin: 20rpx 0;">
											<span style="display: inline-block;margin-right: 30rpx;">库存数<span
													style="color: #000;">{{item.allRemain}}</span>
											</span>
										</view> -->
										<view class="item_bottom">
											<view style="color: #808080;margin-right: 10rpx;">申请数量</view>
											<uni-number-box :min="1" :max="999" v-model="item.bindNumber" />
										</view>
									</label>
								</checkbox-group>
							</view>

						</scroll-view>
					</view>

					<!-- <view class="stockOrder" v-for="(ele,indexO) in addCancelData">
							<view class="businessStock">
								<u--image :showLoading="true" :src="ele.picture" width="80px" height="80px"
									class="top_left"></u--image>
								<view class="top_right" style="padding-left: 20rpx;">
									<view style="margin-bottom: 10rpx;" class="top_right_weight mb_10">
										{{ ele.materialName }}
									</view>
									<view style="margin-bottom: 10rpx;" class="mb_10">物资规格：
										<span>{{ ele.specParam ? ele.specParam : '-' }}</span>
									</view>
									<view style="margin-bottom: 10rpx;" class="mb_10">申请物资数量：
										<span>×{{ ele.count }}<span v-if="ele.skuUnit">({{ele.count}})</span></span>
									</view>
								</view>
								<view style="width: 50px;">
									<button type="primary" @click="deleteAddCancel(indexO)">删除</button>
								</view>
							</view>
							<view style="margin:20rpx;border-bottom: 1px solid #f6f6f6"></view>
						</view> -->
				</view>
				<view style="height: 50px;"></view>
			</view>
		</tui-drawer>
		<!-- 区域价格列表 -->
		<!-- <view v-if="!editDisabled" class="card" style="margin-top: 40rpx;padding: 10px 10px 10px 10px;">
				<view class="product-title">价格信息</view>
				<view style="display: flex;flex-direction: column;">
					<view v-for="(pItme,indexP) in queryCityData" :key="pItme.operateCityId">
						<view style="border-radius: 10px;background-color: #f5f5f5;margin: 20rpx 0;">
							<view class="demo-uni-row">
								<view class="demo-uni-col dark" style="font-weight: bold;font-size: 34rpx;">
									{{pItme.name}}
								</view>
							</view>
							<view class="demo-uni-row"
								style="display: flex;justify-content: space-between;padding:  20rpx;">
								<view class="demo-uni-col light" style="color: #808080;">新价格</view>
								<view class="demo-uni-col light">
									<view class="input-container">
										<span class="fixed-text">￥</span><input type="number" v-model="pItme.price"
											:min="0"
											style="border: 2rpx solid #fff;background-color: #fff;display: inline-block;width: 40%;height: 70rpx;padding-left: 50rpx;width: 100px;"
											placeholder="新价格" @blur="blur1(pItme,indexP)" />
									</view>
								</view>
							</view>
							<view class="demo-uni-row"
								style="display: flex;justify-content: space-between;padding:  20rpx;">
								<view class="demo-uni-col light" style="color: #808080;">原价</view>
								<view class="demo-uni-col light">
									<view class="input-container">
										<span class="fixed-text">￥</span><input type="number" v-model="pItme.unitPrice"
											:min="0"
											style="border: 2rpx solid #fff;background-color: #fff;display: inline-block;width: 40%;height: 70rpx;padding-left: 50rpx;width: 100px;"
											placeholder="单价" @blur="blur2(pItme,indexP)" />
									</view>
								</view>
							</view>
							<view class="demo-uni-row"
								style="display: flex;justify-content: space-between;padding: 20rpx;">
								<view class="demo-uni-col light" style="color: #808080;">成本价</view>
								<view class="demo-uni-col light">
									<view class="input-container">
										<span class="fixed-text">￥</span><input type="number" v-model="pItme.cost"
											:min="0"
											style="border: 2rpx solid #fff;background-color: #fff;display: inline-block;width: 40%;height: 70rpx;padding-left: 50rpx;width: 100px;"
											placeholder="成本价" @blur="blur2(pItme,indexP)" />
									</view>
								</view>
							</view>
						</view>
					</view>
				</view>
			</view> -->
		<!-- 仓库信息 -->
		<!-- <view v-if="!editDisabled" class="card"
				style="margin-top: 40rpx;padding: 10px 10px 10px 10px;margin-bottom: 100rpx;">
				<view class="product-title">仓库信息</view>
				<view style="flex-flow: row wrap;margin-bottom: 100rpx;">
					<view v-for="(item,index) in depotData"
						style="background-color: #f5f5f5;border-radius: 10px;margin: 20rpx 0;">
						<view class="demo-uni-row">
							<view class="demo-uni-col dark" style="font-weight: bold;">{{item.depotName}}</view>
						</view>

						<view class="demo-uni-row"
							style="display: flex;justify-content: space-between;padding:  20rpx;">
							<view class="demo-uni-col light" style="line-height: 30px;">库存模式</view>
							<view class="sku-select1">
								<view class="uni-flex uni-row" style="-webkit-flex-wrap: wrap;flex-wrap: wrap;">
									<view class="flex-text"
										:class='ele.type == item.inventoryModel?"right-class-active":""'
										v-for="(ele,index1) in skuArr2" :key="index1" @click='tapAttr2(ele,item,index)'>
										{{ele.sku}}
									</view>
								</view>
							</view>
						</view>

						<view class="demo-uni-row"
							style="display: flex;justify-content: space-between;padding:  20rpx;">
							<view class="demo-uni-col light" style="line-height: 30px;">是否寄售</view>
							<view class="sku-select1">
								<view class="uni-flex uni-row" style="-webkit-flex-wrap: wrap;flex-wrap: wrap;">
									<view class="flex-text"
										:class='sale.type == item.consignPreSale?"right-class-active":""'
										v-for="(sale,indexT) in consignPreSaleAttr" :key="indexT"
										@click='tapSaleAttr(sale,item,index)'>
										{{sale.name}}
									</view>
								</view>
							</view>
						</view>

						<view class="demo-uni-row" style="display: flex;flex-direction: row;padding:  20rpx;">
							<view class="demo-uni-col dark">库存总数</view>
							<view style="flex: 1;margin-left: 40rpx;">
								<input type="number" v-model="item.totalInventory" :min="0"
									style="border: 2rpx solid #fff;background-color: #fff;" placeholder="输入库存总数"
									@blur="blur(item,index)" />
							</view>
						</view>
					</view>
				</view>
			</view> -->

		<!-- <scroll-view :scroll-y="true" :style="{ 'padding-bottom':'20rpx' }"
				style="height: 100%; overflow: hidden;margin-bottom: 150rpx;">

			</scroll-view> -->


		<!-- </u--form> -->



		<!-- 选择箱规单位 -->
		<view>
			<tui-drawer mode="bottom" :visible="showGroupUnit" @close="close">
				<view class="u-demo-block2 ensure">
					<!-- <view class="title" style="text-align: center;position: relative;padding-top: 20rpx;">选择售卖单位<text
							@click="close" class="iconfont icon-guanbi5"
							style="position: absolute;right: 30rpx; top: 0;padding-top: 20rpx;"></text></view> -->
					<view class="title">
						<text @click="close" class="iconfont icon-guanbi5"></text>
						选择售卖单位
						<text @click="sellUnitComuleDate" class="iconfontRight">确认</text>
					</view>
					<view style="margin: 10px 0 10px 0">
						<view class="sku-select">
							<view class="uni-flex uni-row" style="-webkit-flex-wrap: wrap;flex-wrap: wrap;">
								<view class="flex-text" :class='item.name == sellUnitValue? "right-class-active" :""'
									v-for="(item,index) in unitList" :key="index" @click='tapAttr(item)'>
									{{item.name}}
								</view>
							</view>
						</view>
					</view>
				</view>
			</tui-drawer>
		</view>
		<!-- 选择规格单位 -->
		<view>
			<!-- <u-popup style="flex: 0;!important" :show="showGroupUnit2" @close="close"> -->
			<tui-drawer mode="bottom" :visible="showGroupUnit2" @close="close">
				<view class="u-demo-block2 ensure">
					<view class="titleRight">选择内包装单位<text @click="close" class="iconfont icon-guanbi5"></text></view>
					<view style="margin: 10px 0 10px 0">
						<view class="sku-select">
							<view class="uni-flex uni-row" style="-webkit-flex-wrap: wrap;flex-wrap: wrap;">
								<view class="flex-text"
									:class='item.name == form1.productAttr.specUnit.innerPackagingUnit? "right-class-active" :""'
									v-for="(item,index) in unitList" :key="index" @click='tapAttr(item)'>
									{{item.name}}
								</view>
							</view>
						</view>
					</view>
				</view>
				<!-- </u-popup> -->
			</tui-drawer>
		</view>
		<!-- 内包装单位名称 -->
		<view>
			<!-- <u-popup style="flex: 0;!important" :show="showGroupUnit3" @close="close"> -->
			<tui-drawer mode="bottom" :visible="showGroupUnit3" @close="close">
				<view class="u-demo-block2 ensure">
					<view class="titleRight">选择最小规格单位<text @click="close" class="iconfont icon-guanbi5"></text></view>
					<view style="margin: 10px 0 10px 0">
						<view class="sku-select">
							<view class="uni-flex uni-row" style="-webkit-flex-wrap: wrap;flex-wrap: wrap;">
								<view class="flex-text"
									:class='item.unitName == form1.productAttr.specUnit.minSpecUnit? "right-class-active" :""'
									v-for="(item,index) in innerPackagingUnitList" :key="index" @click='tapAttr(item)'>
									{{item.unitName}}
								</view>
							</view>
						</view>
					</view>
				</view>
			</tui-drawer>
			<!-- </u-popup> -->
		</view>
		<!-- 净重单位名称 -->
		<view>
			<!-- <u-popup style="flex: 0;!important" :show="showGroupUnit4" @close="close"> -->
			<tui-drawer mode="bottom" :visible="showGroupUnit4" @close="close">
				<view class="u-demo-block2 ensure">
					<view class="titleRight">选择净重单位<text @click="close" class="iconfont icon-guanbi5"></text></view>
					<view style="margin: 10px 0 10px 0">
						<view class="sku-select">
							<view class="uni-flex uni-row" style="-webkit-flex-wrap: wrap;flex-wrap: wrap;">
								<view class="flex-text"
									:class='item.unitName == form1.productAttr.specUnit.netWeightUnit? "right-class-active" :""'
									v-for="(item,index) in netWeightUnitList" :key="index" @click='tapAttr(item)'>
									{{item.unitName}}
								</view>
							</view>
						</view>
					</view>
				</view>
			</tui-drawer>
			<!-- </u-popup> -->
		</view>
		<!-- 毛重单位名称 -->
		<view>
			<!-- <u-popup style="flex: 0;!important" :show="showGroupUnit5" @close="close"> -->
			<tui-drawer mode="bottom" :visible="showGroupUnit5" @close="close">
				<view class="u-demo-block2 ensure">
					<view class="titleRight">选择毛重单位<text @click="close" class="iconfont icon-guanbi5"></text></view>
					<view style="margin: 10px 0 10px 0">
						<view class="sku-select">
							<view class="uni-flex uni-row" style="-webkit-flex-wrap: wrap;flex-wrap: wrap;">
								<view class="flex-text"
									:class='item.unitName == form1.productAttr.specUnit.roughWeightUnit? "right-class-active" :""'
									v-for="(item,index) in roughWeightUnitList" :key="index" @click='tapAttr(item)'>
									{{item.unitName}}
								</view>
							</view>
						</view>
					</view>
				</view>
			</tui-drawer>
			<!-- </u-popup> -->
		</view>
		<!-- 箱规单位 -->
		<view>
			<!-- <u-popup style="flex: 0;!important" :show="showGroupUnit6" @close="close"> -->
			<tui-drawer mode="bottom" :visible="showGroupUnit6" @close="close">
				<view class="u-demo-block2 ensure">
					<view class="titleRight">选择箱规单位<text @click="close" class="iconfont icon-guanbi5"></text></view>
					<view style="margin: 10px 0 10px 0">
						<view class="sku-select">
							<view class="uni-flex uni-row" style="-webkit-flex-wrap: wrap;flex-wrap: wrap;">
								<view class="flex-text"
									:class='item.name == form1.productAttr.specUnit.cartonUnit? "right-class-active" :""'
									v-for="(item,index) in unitList" :key="index" @click='tapAttr(item)'>
									{{item.name}}
								</view>
							</view>
						</view>
					</view>
				</view>
			</tui-drawer>
			<!-- </u-popup> -->
		</view>
		<!-- 保质期单位 -->
		<view>
			<!-- <u-popup style="flex: 0;!important" :show="showGroupUnit7" @close="close"> -->
			<tui-drawer mode="bottom" :visible="showGroupUnit7" @close="close">
				<view class="u-demo-block2 ensure">
					<view class="titleRight">选择保质日期单位<text @click="close" class="iconfont icon-guanbi5"></text></view>
					<view style="margin: 10px 0 10px 0">
						<view class="sku-select">
							<view class="uni-flex uni-row" style="-webkit-flex-wrap: wrap;flex-wrap: wrap;">
								<view class="flex-text"
									:class='item.name == form1.productAttr.specUnit.shelfLifeUnit? "right-class-active" :""'
									v-for="(item,index) in shelfLifeUnitList" :key="index" @click='tapAttr(item)'>
									{{item.name}}
								</view>
							</view>
						</view>
					</view>
				</view>
			</tui-drawer>
			<!-- </u-popup> -->
		</view>
		<!-- 运输方式选择 -->
		<view>
			<!-- <u-popup style="flex: 0;!important" :show="showGroupUnit8" @close="close"> -->
			<tui-drawer mode="bottom" :visible="showGroupUnit8" @close="close">
				<view class="u-demo-block2 ensure">
					<view class="titleRight">选择运输方式<text @click="close" class="iconfont icon-guanbi5"></text></view>
					<view style="margin: 10px 0 10px 0">
						<!-- <u-radio-group v-model="radiovalue1" placement="column" iconPlacement="right">
							<u-radio :customStyle="{marginBottom: '8px'}"
								style="border-bottom: 1px solid #c2c2c2;padding-bottom: 8rpx;"
								v-for="(item, index) in radiolist1" :key="index" :label="item.name" :name="item.name"
								@change="radioChange">
							</u-radio>
						</u-radio-group> -->
						<radio-group v-model="radiovalue1" @change="radioChange">
							<label
								style="display: flex;flex-direction: row;margin: 20rpx;border-bottom: 1px solid #eee;padding: 20rpx 0;"
								v-for="(item, index) in radiolist1" :key="index">
								<view>
									<radio :value="item.name" />
								</view>
								<view style="line-height: 19px;">{{item.name}}</view>
							</label>
						</radio-group>
					</view>
				</view>
			</tui-drawer>
			<!-- </u-popup> -->
		</view>
		<!-- 贮存方式选择 -->
		<view>
			<!-- <u-popup style="flex: 0;!important" :show="showGroupUnit9" @close="close"> -->
			<tui-drawer mode="bottom" :visible="showGroupUnit9" @close="close">
				<view class="u-demo-block2 ensure">
					<!-- <view class="title" style="text-align: center;position: relative;padding-top: 20rpx;">选择贮存方式<text
							@click="close" class="iconfont icon-guanbi5"
							style="position: absolute;right: 30rpx; top: 0;padding-top: 20rpx;"></text></view> -->
					<view class="title"><text @click="closeComuleDate" class="iconfont icon-guanbi5"></text>选择贮存方式<text
							@click="storageModeComuleDate" class="iconfontRight">确认</text></view>
					<view style="margin: 10px 0 10px 0">
						<radio-group v-model="radiovalue2" @change="radioChange2">
							<label
								style="display: flex;flex-direction: row;margin: 20rpx;border-bottom: 1px solid #eee;padding: 20rpx 0;"
								v-for="(item, index) in radiolist2" :key="index">
								<view>
									<radio :value="item.name" />
								</view>
								<view style="line-height: 19px;">{{item.name}}</view>
							</label>
						</radio-group>
					</view>
				</view>
			</tui-drawer>
			<!-- </u-popup> -->
		</view>

		<view class="footer">
			<view>
				<span style="font-size: 30rpx;color: #605d60;">规格预览</span>
				<!-- <span style="font-weight: bold;font-size: 16px;padding-left: 10rpx;"
					v-if="form1.productAttr.minSpecNumber != '' && form1.productAttr.innerPackagingNumber != '' && form1.productAttr.minSpecUnit != '' && form1.productAttr.sellUnit != '' && form1.productAttr.innerPackagingUnit != ''">{{form1.productAttr.minSpecNumber * form1.productAttr.innerPackagingNumber}}{{form1.productAttr.minSpecUnit}}/{{form1.productAttr.sellUnit}}({{form1.productAttr.minSpecNumber}}{{form1.productAttr.innerPackagingUnit}})
				</span> -->
				<span v-if="form1.productAttr.specUnit.minSpecNumber == 1">
					<span style="font-weight: bold;font-size: 16px;padding-left: 10rpx;"
						v-if="inputValid1 && inputValid2 && inputValid3 && inputValid4 && inputValid5">{{form1.productAttr.specUnit.minSpecNumber * form1.productAttr.specUnit.innerPackagingNumber}}{{form1.productAttr.specUnit.minSpecUnit}}/{{form1.productAttr.specUnit.sellUnit}}
					</span>
				</span>
				<span v-else-if="form1.productAttr.specUnit.minSpecNumber != 1">
					<span style="font-weight: bold;font-size: 16px;padding-left: 10rpx;"
						v-if="inputValid1 && inputValid2 && inputValid3 && inputValid4 && inputValid5">{{form1.productAttr.specUnit.minSpecNumber * form1.productAttr.specUnit.innerPackagingNumber}}{{form1.productAttr.specUnit.minSpecUnit}}/{{form1.productAttr.specUnit.sellUnit}}({{form1.productAttr.specUnit.minSpecNumber}}{{form1.productAttr.specUnit.innerPackagingUnit}})
					</span>
				</span>


			</view>
			<view>
				<button @click="submitProductAttr" class="bg_color button_footer" :color="bgColor">保存</button>
			</view>

		</view>
	</view>
</template>

<script>
	import {
		getMaterialsLisAPi
	} from '@/api/materials.js';
	import tuiDrawer from '@/components/tui-drawer/index.vue';
	import {
		queryDepotInformationApi
	} from '@/api/goodsAndDepot.js';
	import {
		queryBusinessOperateCityApi
	} from '@/api/businessStatus.js';
	import {
		setThemeColor
	} from '@/utils/setTheme.js';
	let app = getApp();
	// var unit = require('../../../common/units.js');
	var unit = require('../unitsjs/units.js');
	export default {
		components: {
			tuiDrawer
		},
		data() {
			return {
				bgColor: "#ffffff",
				theme: app.globalData.theme,
				productAttrParam: { //传递的数据
					data: {
						"id": 0,
						"productId": 0,
						"sku": "",
						"stock": 0,
						"sales": 0,
						"price": "",
						"image": "0",
						"cost": "0",
						"otPrice": "0",
						"weight": "0",
						"volume": "0",
						"brokerage": 0,
						"brokerageTwo": 0,
						"type": 0,
						"quota": 0,
						"quotaShow": 0,
						"attrValue": "{\"规格\":\"烧烤小鱼仔黄花鱼10串装\"}",
						"minPrice": null,
						"barCode": "0",
						// sign:2, //0修改 1删除，2添加，3没动
						"specUnit": {},
					},
					type: "add",
					from: "saveProduct",
					attrKey: "规格", //默认attrKey
					// unitName: '',
				}, //商品规格参数
				imageList1: [], //
				form1: {
					productAttr: { //绑定的数据
						sku: "",
						barCode: "",
						weight: "",
						volume: "",
						stock: 0,
						price: 0,
						cost: "",
						otPrice: 0,
						prices: null,
						stocks: null,
						sales: 0,
						brokerage: 0,
						brokerageTwo: 0,
						type: 0,
						quota: 0,
						quotaShow: 0,
						minPrice: null,
						isShelfLife: "1", //1有保质期，2没有保质期
						// --
						image: "",
						attrValue: "",
						specUnit: {
							netWeight: null,
							innerPackagingNumber: null,
							minSpecNumber: null,
						},
						// shelfLifeUnit: "",
						// IntBarCode: "",
						// sellUnit: "",
						// minSpecNumber: '',
						// innerPackagingUnit: '',
						// innerPackagingNumber: '',
						// minSpecUnit: '',
						netWeight: '', //净重
						grossWeight: '', //毛重
						// roughWeight: '',
						// netWeightUnit: '',
						// roughWeightUnit: '',
						// cartonNumber: '',
						// cartonUnit: '',
						// shelfLifeNumber: '',
						// internationalBarcode: '',
					},
				},
				rules: {
					'productAttr.specUnit.minSpecNumber': {
						type: 'number',
						required: true,
						message: '规格数量不能为空',
						trigger: ['blur', 'change']
					},
					// 'productAttr.specUnit.netWeight':{
					// 	type:'number',
					// 	required:true,
					// 	message: '商品净重不能为空',
					// 	trigger: ['blur', 'change']
					// },
					'productAttr.specUnit.roughWeight': {
						type: 'number',
						required: true,
						message: '商品毛重和单位不能为空',
						trigger: ['blur', 'change']
					},
					'productAttr.specUnit.cartonNumber': {
						type: 'number',
						required: true,
						message: '商品箱规数不能为空',
						trigger: ['blur', 'change']
					},
					'productAttr.specUnit.manufactureDate': {
						type: 'string',
						required: true,
						message: '生产日期不能为空',
						trigger: ['blur', 'change']
					},
					'productAttr.specUnit.isShelfLife': {
						type: 'number',
						required: true,
						message: '保质日期不能为空',
						trigger: ['blur', 'change']
					},
					'productAttr.specUnit.modeOfTransport': {
						type: 'string',
						required: true,
						message: '商品运输方式不能为空',
						trigger: ['blur', 'change']
					},
					'productAttr.specUnit.storageMode': {
						type: 'string',
						required: true,
						message: '商品贮存方式不能为空',
						trigger: ['blur', 'change']
					},
					'productAttr.specUnit.IntBarCode': {
						type: 'string',
						required: true,
						message: '国际条码不能为空',
						trigger: ['blur', 'change']
					}
				},
				// ------------------------>
				showGroupUnit3: false, //选择最小包装单位弹窗
				innerPackagingUnitList: [{
					unitName: 'ml',
					id: 1,
				}, {
					unitName: 'L',
					id: 2,
				}, {
					unitName: 'kg',
					id: 3,
				}, {
					unitName: 'g',
					id: 4,
				}], //最小包装单位名称
				netWeightUnitList: [{
					unitName: '斤',
					id: 1,
				}, {
					unitName: '两',
					id: 2,
				}, {
					unitName: '公斤',
					id: 3,
				}, {
					unitName: 'g',
					id: 4,
				}, {
					unitName: 'kg',
					id: 5,
				}, {
					unitName: 'ml',
					id: 6,
				}, {
					unitName: 'L',
					id: 7,
				}], // 净重单位名称
				roughWeightUnitList: [{
					unitName: 'kg',
					id: 1,
				}, {
					unitName: 'g',
					id: 2,
				}, {
					unitName: '公斤',
					id: 3,
				}, {
					unitName: '斤',
					id: 4,
				}], // 毛重单位名称
				invoiceTypeShow: false,
				buttonData: [{
					name: '有保质期',
					type: 1
				}, {
					name: '无保质期',
					type: 0
				}],
				shelfLifeUnitList: [{
					name: '个月',
					id: 1,
				}, {
					name: '年',
					id: 2,
				}, {
					name: '天',
					id: 3
				}],
				IntBarCodeList: [{
					name: '有',
					type: '1',
				}, {
					name: '没有',
					type: '2'
				}],
				showGroupUnit: false, //选择规格单位
				showGroupUnit2: false, //选择规格单位后缀
				showGroupUnit4: false, //选择净重单位弹窗
				showGroupUnit5: false, //选择毛重单位弹窗
				showGroupUnit6: false, //选择箱规单位弹窗
				showGroupUnit7: false, //保质期单位
				showGroupUnit8: false, //运输方式弹窗
				showGroupUnit9: false, //贮存方式弹窗
				unitList: [], //单位集合
				attrValue: {},
				innterIndexUnits: '', //默认索引
				attrValue2: {}, //一级后面单位
				// --------------------------------->
				attChangeValue: {}, //保质期选择
				// --------------
				// 运输方式
				radiolist1: [{
						name: '-20℃冷冻运输',
						disabled: false,
						id: 1
					},
					{
						name: '冷藏运输',
						disabled: false,
						id: 2
					},
					{
						name: '常温运输',
						disabled: false,
						id: 3,
					}, {
						name: '其他',
						disabled: false,
						id: 4,
					}
				],
				// u-radio-group的v-model绑定的值如果设置为某个radio的name，就会被默认选中
				radiovalue1: '',
				// 贮存方式
				radiolist2: [{
						name: '冷藏',
						disabled: false,
						id: 1
					},
					{
						name: '冷冻',
						disabled: false,
						id: 2
					},
					{
						name: '常温',
						disabled: false,
						id: 3,
					}
				],
				// u-radio-group的v-model绑定的值如果设置为某个radio的name，就会被默认选中
				radiovalue2: '',
				// -----------
				editDisabled: false,
				//仓库信息
				depotForm: {
					limit: 10,
					page: 1,
				}, // 查询仓库名称
				depotData: [], //仓库数据
				skuArr2: [{
					sku: "每日恢复初始库存",
					type: '1'
				}, {
					sku: "售完即止",
					type: '2'
				}],
				skuAttrValue: '',
				consignPreSaleAttr: [{
					name: "预售",
					type: '0'
				}, {
					name: "寄售",
					type: '1'
				}], //0预售，1寄售
				consignPreSale: '',
				//------------------ 区域价格
				queryCityData: [],
				sellUnitValue: '', //规格售卖单位
				barCodeChangeValue: '', //是否存在国际条码
				isShowList: false, //是否显示下方毛重，净重输入框
				inputValid1: false,
				inputValid2: false,
				inputValid3: false,
				inputValid4: false,
				inputValid5: false,
				// processedNetWeight:'',
				// 展示更多
				showMoreItem: false,
				isHasIdEdit: false, // 是否为修改/新增
				// ---------------物资添加----------
				vesseValue: '', //所选物资展示
				editDisabled: false,
				vesselInfos: [],
				showUpDatePopup: false, //物资弹窗
				addCancelData: [],
				cancellForm: {
					auditState: 2, //查询寄售
					current: 1,
					size: 10,
					// merId: -1,
				},
				dataList: [{
					checked: false,
					image: '',
					materialName: '托盘',
					specParam: '500KG',
					allRemain: 10,
					unit: '件',
				}, {
					checked: false,
					image: '',
					materialName: '托盘',
					specParam: '500KG',
					allRemain: 10,
					unit: '件',
				}, {
					checked: false,
					image: '',
					materialName: '托盘',
					specParam: '500KG',
					allRemain: 10,
					unit: '件',
				}],
				checkboxValue: [],
			};
		},
		onLoad() {
			this.bgColor = setThemeColor();
			uni.setNavigationBarColor({
				frontColor: '#ffffff',
				backgroundColor: this.bgColor,
			});
			let that = this;

			// APP-NVUE平台暂不支持以this.getOpenerEventChannel()方式获取eventChannel，请换用this.$scope.eventChannel来获取
			// #ifdef APP-NVUE
			const eventChannel = this.$scope.eventChannel; // 兼容APP-NVUE
			// #endif
			// #ifndef APP-NVUE
			const eventChannel = this.getOpenerEventChannel();
			// #endif
			// 监听acceptDataFromOpenerPage事件，获取上一页面通过eventChannel传送到当前页面的数据
			eventChannel.on('productAttr', function(param) {
				that.productAttrParam = param;
				if (param.type == "edit") {
					uni.setNavigationBarTitle({
						title: '修改规格'
					});

					that.form1.productAttr = {
						...param.data
					}; //克隆属性
					that.form1.productAttr.specUnit = JSON.parse(that.form1.productAttr.specUnit);
					if (that.form1.productAttr.specUnit.internationalBarcode) {
						that.form1.productAttr.specUnit.IntBarCode = '有'
					} else {
						that.form1.productAttr.specUnit.IntBarCode = '没有'
					}
					that.form1.productAttr.sign = 0;
					that.formDataInit();

					if (param.data.id) {
						that.isHasIdEdit = true;
					} else {
						that.isHasIdEdit = false;
					}
				} else {
					if (param.data == undefined) {
						that.form1.productAttr.specUnit = {
							isShelfLife: '1',
							shelfLifeUnit: '月',
							IntBarCode: '有'
						};
					} else {
						that.form1.productAttr = {
							...param.data
						}; //克隆属性
						that.form1.productAttr.specUnit = JSON.parse(that.form1.productAttr.specUnit);
						if (that.form1.productAttr.specUnit.internationalBarcode) {
							that.form1.productAttr.specUnit.IntBarCode = '有'
						} else {
							that.form1.productAttr.specUnit.IntBarCode = '没有'
						}
						that.formDataInit();
					};

					that.form1.productAttr.sign = 2;
					that.editDisabled = false;

					if (param.isHasId == true) {
						that.isHasIdEdit = true;
					} else {
						that.isHasIdEdit = false;
					}
				}
			});
			this.unitList = unit.unitList;
			// this.getDepotList();
		},
		computed: {
			// 计算属性，用于对输入的值进行处理
			processedNetWeight: {
				get() {
					// 获取处理后的值
					return this.form1.productAttr.specUnit.minSpecNumber * this.form1.productAttr.specUnit
						.innerPackagingNumber;
				},
				set(value) {
					// 设置处理后的值
					// 在这里可以对输入的值进行处理，然后赋值给 form1.productAttr.netWeight
					this.form1.productAttr.specUnit.netWeight = this.form1.productAttr.specUnit.minSpecNumber * this
						.form1.productAttr
						.specUnit.innerPackagingNumber
				}
			}
		},
		watch: {
			'form1.productAttr.specUnit.sellUnit': function(newVal, oldVal) {
				this.inputValid1 = false;
				if (newVal != '' && newVal != undefined) {
					this.inputValid1 = true;
				}
			},
			'form1.productAttr.specUnit.minSpecNumber': function(newVal, oldVal) {
				this.inputValid2 = false;
				if (newVal != '' && newVal != undefined) {
					this.inputValid2 = true;
				}
			},
			'form1.productAttr.specUnit.innerPackagingUnit': function(newVal, oldVal) {
				this.inputValid3 = false;
				if (newVal != '' && newVal != undefined) {
					this.inputValid3 = true;
				}
			},
			'form1.productAttr.specUnit.innerPackagingNumber': function(newVal, oldVal) {
				this.inputValid4 = false;
				if (newVal != '' && newVal != undefined) {
					this.inputValid4 = true;
				}
			},
			'form1.productAttr.specUnit.minSpecUnit': function(newVal, oldVal) {
				this.inputValid5 = false;
				if (newVal != '' && newVal != undefined) {
					this.inputValid5 = true;
					this.form1.productAttr.specUnit.netWeightUnit = this.form1.productAttr.specUnit.minSpecUnit
				}
			}
		},
		methods: {
			// 显示更多
			isShowMoreItem() {
				this.showMoreItem = !this.showMoreItem;
			},
			/** 选择物资配置 */
			openDataPopup() {
				this.showUpDatePopup = true;
				this.getQueryList();
			},
			//关闭弹窗
			closeComuleDate() {
				this.showUpDatePopup = false;
			},
			// 触底事件 onReachBottom 加载更多数据
			scrolltolowerFn() {
				if (this.loadMoreStatus != 'more') {
					return;
				};
				this.cancellForm.current++;
				this.getQueryList(true);
			},
			// --------api------获取数据
			getQueryList(isMerge) {
				let that = this;
				uni.showLoading({
					title: '加载中',
					mask: true
				});
				if (!isMerge) {
					this.cancellForm.current = 1;
					this.loadMoreStatus = 'more';
				};
				getMaterialsLisAPi(this.cancellForm).then((res) => {
					let data = res.data;
					if (isMerge) {
						that.$util.SplitArray(data.records, that.dataList);
					} else {
						that.dataList = data.records;
					}
					for (let item of that.dataList) {
						item.checked = false;
					}
					that.totalPage = data.pages;
					if (data.pages == this.cancellForm.current) {
						that.loadMoreStatus = 'noMore';
					}
					uni.hideLoading();
				})
			},
			checkboxGroup(ele) {
				//-----------
				let checkBoxValue = ele.detail.value
				let checkBoxGroup = checkBoxValue.map((item) => JSON.parse(item));
				for (let item of checkBoxGroup) {
					item.checked = true;
				};
				this.checkboxValue = checkBoxValue;
			},
			/** 复选框确认事件 */
			materialConfirm() {
				let checkboxValue = this.checkboxValue.map((item) => JSON.parse(item));
				this.showUpDatePopup = false;
				let vesseValue = [];
				let vesselInfos = []; //提交的物资数组
				for (let item of checkboxValue) {
					vesseValue.push(
						`${item.materialName}*${item.bindNumber}`
					);
					vesselInfos.push({
						vesselCount: item.bindNumber,
						vesselId: item.id,
						details: {
							// bindNumber: item.bindNumber,
							...((({ bindNumber,checked, ...rest }) => rest)(item)), 
						},
					})
				};
				this.vesselInfos = vesselInfos;
				this.vesseValue = vesseValue.join(",");
			},
			//提交保存规格
			submitProductAttr() {
				// 更新商标识
				let isUpdate = this.productAttrParam.type == "edit";
				// 校验数据
				let that = this;
				if (this.imageList1.length == 0) {
					uni.$u.toast('规格图片不能为空');
					return;
				};
				if (!this.form1.productAttr.specUnit.minSpecUnit) {
					uni.$u.toast('最小规格单位不能为空');
					return;
				}
				if (!this.form1.productAttr.specUnit.sellUnit) {
					uni.$u.toast('箱规单位不能为空');
					return;
				} else if (!this.form1.productAttr.specUnit.netWeightUnit) {
					uni.$u.toast('商品净重单位不能为空');
					return;
				} else if (!this.form1.productAttr.specUnit.roughWeightUnit) {
					uni.$u.toast('商品毛重单位不能为空');
					return;
				} else if (!this.form1.productAttr.specUnit.cartonUnit) {
					uni.$u.toast('商品箱规单位不能为空');
					return
				}
				if (that.form1.productAttr.specUnit.IntBarCode == '有') {
					if (!this.form1.productAttr.specUnit.internationalBarcode) {
						uni.$u.toast('国际编码不能为空');
						return;
					}
				}

				// if (that.editDisabled === false) {
				// 	let allEmpty = true; // 假设所有totalInventory都为空
				// 	let allPrice = true;
				// 	for (let i = 0; i < that.depotData.length; i++) {
				// 		if (that.depotData[i].totalInventory.trim() !== '') {
				// 			allEmpty = false; // 只要有一个totalInventory不为空，则标记为false
				// 			break; // 只要有一个不为空就无需再继续遍历
				// 		}
				// 	}

				// 	if (allEmpty) {
				// 		uni.$u.toast('单个库存数量，不能为空');
				// 		return;
				// 	}


				// 	for (let i = 0; i < that.queryCityData.length; i++) {
				// 		if (that.queryCityData[i].price.trim() !== '' && that.queryCityData[i].unitPrice.trim() !==
				// 			'' && that.queryCityData[i].cost.trim() !== '') {
				// 			allPrice = false; // 只要有一个totalInventory不为空，则标记为false
				// 			break; // 只要有一个不为空就无需再继续遍历
				// 		}
				// 	}
				// 	if (allPrice) {
				// 		uni.$u.toast('单个事业部价格，不能为空');
				// 		return;
				// 	}
				// };

				// 要处理的属性名
				let targetProperties = ['cartonNumber', 'innerPackagingNumber', 'minSpecNumber', 'netWeight',
					'roughWeight', 'shelfLifeNumber'
				];
				// 遍历目标属性数组
				targetProperties.forEach(key => {
					// 检查属性是否存在于对象中
					if (that.form1.productAttr.specUnit.hasOwnProperty(key)) {
						// 将属性值转换为数值类型，并重新赋值给属性
						that.form1.productAttr.specUnit[key] = parseFloat(that.form1.productAttr.specUnit[key]);
					}
				});
				this.$refs.uForm.validate().then(res => {
					// 同步表单数据
					that.getFormValue();
					// 更新源数据。
					if (this.form1.productAttr.specUnit.isShelfLife == '0') {
						this.form1.productAttr.specUnit.shelfLifeUnit = '';
						this.form1.productAttr.specUnit.shelfLifeNumber = '';
					};
					// let newDepotData = [];
					// for (let i = 0; i < that.depotData.length; i++) {
					// 	if (that.depotData[i].totalInventory.trim() !== '') {
					// 		newDepotData.push(that.depotData[i])
					// 	}
					// }

					// let newQueryCityData = [];
					// for (let i = 0; i < that.queryCityData.length; i++) {
					// 	if (that.queryCityData[i].price.trim() !== '' && that.queryCityData[i].unitPrice.trim() !==
					// 		'' && that.queryCityData[i].cost.trim() !== '') {
					// 		newQueryCityData.push(that.queryCityData[i])
					// 	}
					// }
					that.form1.productAttr.internationalBarcode = that.form1.productAttr.specUnit
						.internationalBarcode;
					that.form1.productAttr.netWeight = this.form1.productAttr.specUnit.minSpecNumber * this.form1
						.productAttr
						.specUnit.innerPackagingNumber;
					that.form1.productAttr.specUnit.netWeight = this.form1.productAttr.specUnit.minSpecNumber *
						this.form1
						.productAttr
						.specUnit.innerPackagingNumber;
					that.form1.productAttr.grossWeight = that.form1.productAttr.specUnit.roughWeight;
					delete that.form1.productAttr.specUnit.IntBarCode;
					that.form1.productAttr.unit = that.form1.productAttr.specUnit.sellUnit;

					if (that.form1.productAttr.specUnit.roughWeightUnit == "g") {
						// that.form1.productAttr.specUnit.roughWeight = that.form1.productAttr.specUnit.roughWeight /
						// 	1000;
						that.form1.productAttr.weight = that.form1.productAttr.specUnit.roughWeight /
							1000;
					} else if (that.form1.productAttr.specUnit.roughWeightUnit == "斤") {
						// that.form1.productAttr.specUnit.roughWeight = that.form1.productAttr.specUnit.roughWeight /
						// 	2;
						that.form1.productAttr.weight = that.form1.productAttr.specUnit.roughWeight /
							2;
					}
					// that.form1.productAttr.weight = that.form1.productAttr.specUnit.roughWeight;
					let stringSpecUnit = JSON.stringify(that.form1.productAttr.specUnit);
					//规格
					// that.form1.productAttr.specUnit = stringSpecUnit;
                    that.form1.productAttr.vesselInfos = that.vesselInfos;
					// that.form1.productAttr.stocks = newDepotData;
					// that.form1.productAttr.prices = newQueryCityData;
					that.productAttrParam.data = that.form1.productAttr;
					that.productAttrParam.data.specUnit = stringSpecUnit;

					if (that.productAttrParam.from == "saveProduct") {
						//商品保存：添加、编辑规格数据
						that.toSaveProductAttr(that.productAttrParam);
					} else {
						console.log("TODO 商品快捷添加规格（直接入库）");
						//TODO 商品快捷添加规格（直接入库）
					}

				}).catch(errors => {
					console.log("submitProductAttr error", errors);
					uni.$u.toast('请填写完整规格信息！');
				})

			},
			// 获取城市 id
			getDepotList() {
				queryDepotInformationApi(this.depotForm).then((res) => {
					let depot = res.data.list
					let depotData = depot.map(obj => {
						const {
							createMemberName,
							depotAddress,
							depotTelephone,
							updatedMemberName,
							zoneId,
							id,
							operateId,
							...rest
						} = obj; //删除部分属性
						return rest
					}); //要删除的数据的数组
					for (let item of depotData) {
						item.inventoryModel = '1',
							item.consignPreSale = '0',
							item.totalInventory = ''
					}
					this.depotData = depotData
				});
				queryBusinessOperateCityApi({
					queryType: 0
				}).then((res) => {
					let queryCityList = [];
					for (const ele of res.data) {
						for (const item of ele.sonVOList) {
							queryCityList.push({
								name: item.name,
								operateCityId: item.useId,
								cost: '',
								price: '',
								unitPrice: '',
							});
						}
					}
					this.queryCityData = queryCityList;
				});
			},
			//输入框失去焦点
			blur(res, index) {
				if (parseInt(res.totalInventory) < 0) {
					this.depotData[index].totalInventory = 0;
				}
				if (this.depotData[index].totalInventory == '') {
					this.depotData[index].totalInventory = 0;
				}
			},
			//输入框失去焦点,判断输入值
			blur1(res, index) {
				if (parseInt(res.newProductPrice) < 0) {
					this.queryCityData[index].newProductPrice = '';
				}
			},
			blur2(res, index) {
				if (parseInt(res.newUnitPrice) < 0) {
					this.queryCityData[index].newUnitPrice = '';
				}
			},
			//库存模式 改变
			tapAttr2(skuItem, item, index) {
				this.skuAttrValue = skuItem;
				this.$set(this.depotData[index], 'inventoryModel', skuItem.type)
			},
			//寄售模式 改变
			tapSaleAttr(saleItem, item, index) {
				this.skuAttrValue = saleItem;
				this.$set(this.depotData[index], 'consignPreSale', saleItem.type);
			},
			//保存商品规格返回商品页面
			toSaveProductAttr(param) {
				let pages = getCurrentPages() // 获取当前页面栈的实例，以数组形式按栈的顺序给出，第一个元素为首页，最后一个元素为当前页面。
				let prevPage = pages[pages.length - 2] //上一页页面实例
				uni.navigateBack({
					delta: 1,
					success: () => {
						prevPage.$vm.otherFun(param) // 给上一页绑定方法otherFun,
					}
				})
			},
			//表单数据初始化
			formDataInit() {
				let attr = this.form1.productAttr;
				this.imageList1 = [];
				this.imageList1.push({
					url: attr.image
				});
			},
			//格式化表单数据
			getFormValue() {
				// let attr = this.form1.productAttr;
				// attr.image = this.imageList1[0].url;
				// let attrValue = {};
				// attrValue[this.productAttrParam.attrKey] = attr.sku;
				// attr.attrValue = JSON.stringify(attrValue);
				let attr = this.form1.productAttr;
				attr.image = this.imageList1[0].url;
				if (attr.specUnit.minSpecNumber == 1) {
					attr.sku =
						`${attr.specUnit.minSpecNumber * attr.specUnit.innerPackagingNumber}` +
						`${attr.specUnit.minSpecUnit}` + '/' +
						`${attr.specUnit.sellUnit}`;
				} else {
					attr.sku =
						`${attr.specUnit.minSpecNumber * attr.specUnit.innerPackagingNumber}` +
						`${attr.specUnit.minSpecUnit}` + '/' +
						`${attr.specUnit.sellUnit}` + '(' +
						`${attr.specUnit.minSpecNumber}` +
						`${attr.specUnit.innerPackagingUnit}` + ')';
				}

				let attrValue = {};
				attrValue[this.productAttrParam.attrKey] = attr.sku;
				attr.attrValue = JSON.stringify(attrValue);

			},
			// 删除图片
			deletePic(event) {
				this.imageList1.splice(event.index, 1)
			},
			// 新增图片
			async afterRead(event) {
				// 当设置 multiple 为 true 时, file 为数组格式，否则为对象格式
				let lists = [].concat(event.file)
				let fileListLen = this[`imageList${event.name}`].length
				lists.map((item) => {
					this[`imageList${event.name}`].push({
						...item,
						status: 'uploading',
						message: '上传中'
					})
				})
				for (let i = 0; i < lists.length; i++) {
					const result = await this.uploadFilePromise(lists[i].url);
					if (result == null) {
						uni.showToast({
							title: "上传失败",
							icon: "none",
						})
						this.deletePic(event.index, 1);
						break;
					}
					let newStatus = {
						status: 'success',
						message: '上传成功',
						url: result,
					}
					let item = this[`imageList${event.name}`][fileListLen]
					this[`imageList${event.name}`].splice(fileListLen, 1, Object.assign(item, newStatus))
					fileListLen++
				}
			},
			uploadFilePromise(filePath) {
				return this.$util.uploadFilePromise(filePath, {
					url: 'upload/image',
					name: "multipart", //固定 multipart
					model: "product", //模块 用户user,商品product,微信wechat,news文章
					pid: 1, //分类ID 0编辑器,1商品图片,2拼团图片,3砍价图片,4秒杀图片,5文章图片,6组合数据图,7前台用户,8微信系列
					count: 1
				});
			},
			// -------------------
			//单位选择--打开弹框
			openGroupUnits(ele) {
				this.innterIndexUnits = ele;
				if (ele == 1) {
					this.showGroupUnit = true; //打开单位弹窗
				}
				if (ele == 2) {
					this.showGroupUnit2 = true; //打开单位后缀弹窗
				}
				if (ele == 3) {
					this.showGroupUnit3 = true; //打开小包装单位后缀弹窗
				}
				if (ele == 4) {
					this.showGroupUnit4 = true; //打开净重单位后缀弹窗
				}
				if (ele == 5) {
					this.showGroupUnit5 = true; //打开毛重单位后缀弹窗
				}
				if (ele == 6) {
					this.showGroupUnit6 = true; //打开箱规单位弹窗
				}
				if (ele == 7) {
					this.showGroupUnit7 = true; //打开保质期单位弹窗
				}

			},
			// 关闭弹窗事件
			close() {
				this.showGroupUnit = false; //关闭单位弹窗
				this.showGroupUnit2 = false; //关闭单位后缀弹窗
				this.showGroupUnit3 = false; //关闭小包装单位后缀弹窗
				this.showGroupUnit4 = false; //关闭净重单位后缀弹窗
				this.showGroupUnit5 = false; //关闭毛重单位后缀弹窗
				this.showGroupUnit6 = false; //关闭箱规单位弹窗
				this.showGroupUnit7 = false; //保质期单位弹窗
				this.showGroupUnit8 = false; //储存方式弹窗
				this.showGroupUnit9 = false; //储存方式弹窗
			},
			tapAttr(skuItem) {
				if (this.innterIndexUnits == 1) {
					this.sellUnitValue = skuItem.name;
					// this.$set(this.form1.productAttr.specUnit, 'sellUnit', skuItem.name)
					this.$set(this, 'sellUnitValue', skuItem.name)
				}
				if (this.innterIndexUnits == 2) {
					// this.form1.productAttr.specUnit.innerPackagingUnit = skuItem.name;
					this.$set(this.form1.productAttr.specUnit, 'innerPackagingUnit', skuItem.name)
					this.showGroupUnit2 = false; //关闭单位后缀弹窗
				}
				if (this.innterIndexUnits == 3) {
					// this.form1.productAttr.specUnit.minSpecUnit = skuItem.unitName;
					this.$set(this.form1.productAttr.specUnit, 'minSpecUnit', skuItem.unitName)
					this.showGroupUnit3 = false; //关闭小包装单位后缀弹窗
				}
				if (this.innterIndexUnits == 4) {
					// this.form1.productAttr.specUnit.netWeightUnit = skuItem.unitName;
					this.$set(this.form1.productAttr.specUnit, 'netWeightUnit', skuItem.unitName)
					this.showGroupUnit4 = false; //关闭净重单位后缀弹窗
				}
				if (this.innterIndexUnits == 5) {
					// this.form1.productAttr.specUnit.roughWeightUnit = skuItem.unitName;
					this.$set(this.form1.productAttr.specUnit, 'roughWeightUnit', skuItem.unitName)
					this.showGroupUnit5 = false; //关闭毛重单位后缀弹窗
				}
				if (this.innterIndexUnits == 6) {
					// this.form1.productAttr.specUnit.cartonUnit = skuItem.name;
					this.$set(this.form1.productAttr.specUnit, 'cartonUnit', skuItem.name)
					this.showGroupUnit6 = false; //关闭箱规单位弹窗
				}
				if (this.innterIndexUnits == 7) {
					// this.form1.productAttr.specUnit.shelfLifeUnit = skuItem.name;
					this.$set(this.form1.productAttr.specUnit, 'shelfLifeUnit', skuItem.name)
					this.showGroupUnit7 = false; //保质期单位弹窗
				}
			},
			// 质保期选择
			attChange(item) {
				this.attChangeValue = item.type;
				// this.form1.productAttr.specUnit.resource = item.name;
				this.form1.productAttr.specUnit.isShelfLife = item.type;
			},
			//运输方式弹窗
			radioGroup() {
				this.showGroupUnit8 = true;
			},
			radioChange(n) {
				let radioValue = n.detail.value;
				this.radiovalue1 = radioValue;
				this.form1.productAttr.specUnit.modeOfTransport = radioValue;
			},
			//贮存方式弹窗
			radioGroup2() {
				this.showGroupUnit9 = true;
			},
			// 贮存方式确认弹窗
			storageModeComuleDate() {
				if (this.radiovalue2 == '') {
					return uni.$u.toast('请选择贮存方式');
				};
				this.$set(this.form1.productAttr.specUnit, 'storageMode', this.radiovalue2)
				this.showGroupUnit9 = false;
			},

			radioChange2(n) {
				let radioValue2 = n.detail.value;
				this.radiovalue2 = radioValue2;
				// this.form1.productAttr.specUnit.storageMode = radioValue2;
			},

			// 确认售卖规格单位
			sellUnitComuleDate() {
				this.$set(this.form1.productAttr.specUnit, 'sellUnit', this.sellUnitValue);
				this.showGroupUnit = false;
			},

			// 国际条码识别判断按钮
			barCodeChange(item) {
				this.barCodeChangeValue = item.type;
				this.$set(this.form1.productAttr.specUnit, 'IntBarCode', item.name)
			},
			scanEvent() {
				uni.scanCode({
					success: function(res) {
						console.log('条码类型：' + res.scanType);
						console.log('条码内容：' + res.result);
						this.form1.productAttr.specUnit.internationalBarcode = res.result;
					}
				});
			}
		}
	}
</script>

<style lang="scss">
	.bg_color {
		@include main_bg_color(theme);
	}

	.plain_bgColor {
		@include main_color(theme);
		@include main_bg_rgba_color(theme, 0.05);
		border: 1rpx solid;
	}

	.disabled-view {
		pointer-events: none;
	}

	.card {
		margin: 0 20rpx 20rpx 20rpx;
		background-color: #fff;
		border-radius: 20rpx;
	}

	.product-title {
		font-size: 18px;
		font-weight: bold;
		margin-bottom: 20rpx;
		margin-top: 10rpx;
	}

	.input-container {
		position: relative;
		width: 80%;
	}

	.fixed-text {
		position: absolute;
		left: 8rpx;
		/* 调整固定文字的左侧偏移量 */
		top: 50%;
		transform: translateY(-50%);
		padding: 10rpx;
		color: #808080;
	}

	.fixed-right {
		position: absolute;
		right: 8rpx;
		/* 调整固定文字的右侧偏移量 */
		top: 50%;
		transform: translateY(-50%);
		padding: 10rpx;
		color: #808080;
	}

	.u-demo-block2 {
		// height: 60vh;
		padding: 20px;
	}

	.u-demo-block__title {
		font-size: 16px;
		font-weight: bold;
		display: block;
		text-align: center;
		margin-bottom: 20px;
	}

	.item-expanded {
		flex-grow: 2 !important;
	}

	.show-more-item {
		// border-top: 1px solid #efefef;
		margin-top: 30rpx;
		padding: 30rpx 0 10rpx 0;
		justify-content: center;
		align-items: center;
		justify-items: center;
		display: flex;
	}

	.sku-select {
		.flex-text {
			margin: 8rpx 8rpx;
			background-color: #f7f7f7;
			line-height: 62rpx;
			text-align: center;
			color: #777;
			padding: 16rpx 34rpx;
			font-size: 26rpx;
			font-weight: bolder;
			border-radius: 10rpx;
			border: 1rpx solid #FFF;
		}

		.right-class-active {
			@include main_color(theme);
			@include main_bg_rgba_color(theme, 0.05);
			border: 1rpx solid;
		}
	}

	.sku-select1 {
		// margin-left: 15%;

		.radio {
			margin: 8rpx 8rpx;
			background-color: #f7f7f7;
			// line-height: 62rpx;
			float: left;
			text-align: center;
			color: #777;
			padding: 16rpx 34rpx;
			font-size: 26rpx;
			font-weight: bolder;
			border-radius: 10rpx;
			border: 1rpx solid #FFF;
		}

		.active {
			@include main_color(theme);
			@include main_bg_rgba_color(theme, 0.05);
			border: 1rpx solid;
		}
	}

	.card-title {
		font-size: 34rpx;
		font-weight: bold;
		padding: 26rpx 6rpx;
	}

	.demo-uni-row {
		font-size: 32rpx;
		// margin: 20rpx 0;
		padding: 20rpx 10rpx;
	}

	.sku-select1 {
		.flex-text {
			margin: 8rpx 8rpx;
			background-color: #fff;
			line-height: 62rpx;
			text-align: center;
			color: #777;
			padding: 10rpx 20rpx;
			font-size: 24rpx;
			border-radius: 10rpx;
			border: 1rpx solid #FFF;
		}

		.right-class-active {
			@include main_color(theme);
			@include main_bg_rgba_color(theme, 0.05);
			border: 1rpx solid;
		}
	}

	.card {
		margin: 20rpx 20rpx 20rpx 20rpx;
		background-color: #fff;
		border-radius: 20rpx;
		padding: 20rpx;
	}

	.demo-uni-row {
		padding: 30rpx 0;
		// margin: 20rpx;
	}

	.choose-container {
		position: relative;
		width: 99%;
		// padding-left: 10rpx;

		.icon-right {
			position: absolute;
			right: 8rpx;
			/* 调整固定文字的右侧偏移量 */
			top: 50%;
			transform: translateY(-50%);
			padding: 10rpx;
			color: #808080;
		}
	}

	.fixed-text {
		position: absolute;
		left: 8rpx;
		/* 调整固定文字的左侧偏移量 */
		top: 50%;
		transform: translateY(-50%);
	}

	.ensure {
		width: 100%;
		background-color: #fff;
		padding-bottom: 22rpx;
		padding-bottom: calc(22rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
		padding-bottom: calc(22rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/

		.title {
			font-size: 30rpx;
			font-weight: bold;
			color: #282828;
			text-align: center;
			margin: 0 0 36rpx 0;
			position: relative;
			padding-bottom: 30rpx;
			border-bottom: 2rpx solid #f0edf0;

			.iconfont {
				position: absolute;
				left: 30rpx;
				top: 0;
				font-size: 30rpx;
			}

			.iconfontRight {
				position: absolute;
				right: 30rpx;
				top: 0;
				font-size: 30rpx;
				@include main_color(theme);
			}
		}

		.titleRight {
			font-size: 30rpx;
			font-weight: bold;
			color: #282828;
			text-align: center;
			margin: 0 0 36rpx 0;
			position: relative;
			padding-bottom: 30rpx;
			border-bottom: 2rpx solid #f0edf0;

			.iconfont {
				position: absolute;
				right: 0;
				top: 0;
				font-size: 30rpx;
			}
		}
	}

	.ves_ensure {
		width: 100%;
		background-color: #fff;
		padding-bottom: 22rpx;
		padding-bottom: calc(22rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
		padding-bottom: calc(22rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/

		.title {
			font-size: 30rpx;
			font-weight: bold;
			color: #282828;
			text-align: center;
			margin: 38rpx 0 36rpx 0;
			position: relative;
			padding-bottom: 30rpx;
			border-bottom: 2rpx solid #f0edf0;

			.iconfont {
				position: absolute;
				right: 30rpx;
				top: 0;
				color: #8b8c8d;
				font-size: 28rpx;
			}
		}
	}

	.print_center {
		// margin-top: 10px;
		// background-color: white;
		flex: 1;
		overflow: scroll;

		.checke_list {
			width: 100%;
			// margin: 20rpx;

			.checke_item {
				display: flex;
				flex-direction: column;
				// justify-content: space-around;
				// align-items: center;
				background-color: #fafafa;
				padding: 20px;
				margin-top: 10px;
				width: 100%;
				border-radius: 20rpx;

				.item_top {
					display: flex;
					// justify-content: space-around;
					align-items: center;

					.item_img {
						margin-right: 10px;

						image {
							width: 50px;
							height: 70px;
						}

					}

					.item_right {
						font-weight: bold;
						line-height: 20px;
					}
				}

				.item_bottom {
					display: flex;
					align-items: center;
					justify-content: flex-end;

					.counter {
						display: flex;
						justify-content: space-between;
						align-items: center;
						width: 100px;
						height: 30px;
						border: 1px solid #ccc;
						border-radius: 5px;
						overflow: hidden;
					}

					.counter text {
						width: 40px;
						height: 30px;
						text-align: center;
						line-height: 30px;
						font-size: 16px;
						color: #333;
					}
				}
			}
		}
	}

	.content-item {
		height: 900rpx;
		margin: 20rpx;
	}

	.tab-view {
		display: flex;
		flex-direction: column;
		flex: 1;
		height: 1000rpx;

		.scroll-view {
			height: 100%;
		}
	}

	.footer {
		display: flex;
		justify-content: space-between;
		align-items: center;
		background-color: white;
		height: 60px;
		padding: 0 30rpx;

		position: fixed;
		bottom: 0px;
		width: 100%;

		view {
			margin-right: 20px;
			// flex: 1;
		}

		.left_button_footer {
			border-radius: 22rpx;
			padding: 20rpx 40rpx;
			color: #fff;
			background-color: #f0f0f0;
		}

		.button_footer {
			border-radius: 22rpx;
			padding: 20rpx 50rpx;
			color: #fff;
			@include main_bg_color(theme);
		}
	}
</style>